<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<title>手机用户登录</title>

<meta
	content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"
	name="viewport">

<link rel="stylesheet"
	href="${pageContext.request.contextPath}/plugins/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/plugins/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/plugins/ionicons/css/ionicons.min.css">
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/plugins/adminLTE/css/AdminLTE.css">
<link rel="stylesheet"
	href="${pageContext.request.contextPath}/plugins/iCheck/square/blue.css">

</head>

<body class="hold-transition login-page">



	<div class="login-box">
		<div class="login-logo">
			<a href="all-admin-index.html"><b>ITCAST</b>后台管理系统</a>
		</div>
		<!-- /.login-logo -->
		<div class="login-box-body">
			<p class="login-box-msg">登录验证系统</p>

			<form action="${pageContext.request.contextPath}/system/user?operation=loginByPhone" method="post">
				<div class="form-group has-feedback">
					<input type="text" name="phoneNum" id="phoneNum" class="form-control" value="${phoneNum}"
						placeholder="手机号"> <span
						class="glyphicon glyphicon-lock form-control-feedback"></span>
				</div>
					<!-- /.col -->


				<button type="button" id="but" class="btn btn-primary btn-block btn-flat" onclick="newCode()">获取验证码</button>

					<!-- /.col -->
				<div class="form-group has-feedback">
					<input type="text" name="code" class="form-control" value=""
						   placeholder="验证码"> <span
						class="glyphicon glyphicon-lock form-control-feedback"></span>
				</div>
				<button type="submit" class="btn btn-primary btn-block btn-flat" >登录</button>

				${msg}
			</form>




		</div>
		<!-- /.login-box-body -->
	</div>
	<!-- /.login-box -->

	<!-- jQuery 2.2.3 -->
	<!-- Bootstrap 3.3.6 -->
	<!-- iCheck -->
	<script

		src="${pageContext.request.contextPath}/plugins/jQuery/jquery-2.2.3.min.js"></script>
	<script
		src="${pageContext.request.contextPath}/plugins/bootstrap/js/bootstrap.min.js"></script>
	<script
		src="${pageContext.request.contextPath}/plugins/iCheck/icheck.min.js"></script>
	<script>
		$(function() {
			$('input').iCheck({
				checkboxClass : 'icheckbox_square-blue',
				radioClass : 'iradio_square-blue',
				increaseArea : '20%' // optional
			});

		});

	</script>
	<script>
		function newCode() {
			// 禁用点击事件
			$("#but").attr("disabled",true);
			// 提交业务
			location.href="${pageContext.request.contextPath}/system/user?operation=findPW&phoneNum="+$("#phoneNum").val();
			// 10秒后启用点击事件
			setTimeout(function(){
				$("#but").removeAttr("disabled");
			},60000);

		}
	</script>
</body>

</html>`